﻿@using F2B.Orchard.Schedule.Models

@{
    SchedulePart schedule = Model.Schedule;

    var eventStartDate = schedule.StartDate;
    if (!schedule.AllDay) {
        eventStartDate += schedule.StartTime;
    }

    var eventEndDate = eventStartDate + schedule.Duration;
    if (schedule.AllDay) {
        eventEndDate -= TimeSpan.FromSeconds(1);
    }

    var startTime = eventStartDate.ToShortTimeString();
}
<span>@startTime</span>